<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order', function (Blueprint $table) {
            $table->increments('id');
            $table->string('order_id')->nullable()->comment('订单编号');
            $table->tinyInteger('status')->default('0')->nullable()->comment('0 完成 1 未完成 2 已支付 3 未支付 4 已发货 5 待发货');
            $table->string('curriculum_name')->nullable()->comment('课程名称');
            $table->decimal('curriculum_price')->nullable()->comment('课程价格');
            $table->text('curriculum_desc')->nullable()->comment('课程介绍');
            $table->string('curriculum_img')->nullable()->comment('课程图片');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order');
    }
}
